# 定义诗歌内容
poem_title = "参观张文秋故居"
poem_author = "作者: 张军"
poem_content = [
    "深秋气爽艳阳天，一众诗翁谒故贤。",
    "巾帼山乡多毓秀，谢湾宅院久留连。",
    "践行主义艰辛史，续写神州红色篇。",
    "教导有方三凤育，联姻领袖两逢缘。"
]

# 计算最长行的长度，用于确定居中的宽度
max_length = max(len(line) for line in poem_content + [poem_title, poem_author])

# 打印顶部分隔线
print("=" * (max_length + 4))

# 居中打印标题、作者
print(poem_title.center(max_length + 4))
print(poem_author.center(max_length + 4))

# 居中打印每一行诗句
for line in poem_content:
    print(line.center(max_length + 4))

# 打印底部分隔线
print("=" * (max_length + 4))